package Model.Construction;

import Model.Ville;

public abstract class Batiment extends Infrastructure {

    protected int coutEau = 0;
    protected int coutElectricite = 0;
    protected int impot = 10;

    public Batiment(int tx, int ty, Ville v, int prixcons) {
        super(tx, ty, v, prixcons);
    }

    @Override
    public void ajoutAVille(int x, int y) {
        super.ajoutAVille(x, y);
        ville.addBatimentImpot(this);
    }

    public int getCoutEau() {
        return coutEau;
    }

    public int getCoutElectricite() {
        return coutElectricite;
    }

    public int getImpot() {
        return impot;
    }

    @Override
    public String getInfo() {
        String s1 = super.getInfo();
        String s2 = "Impots : " + impot + "\n";
        return s1 + s2;
    }

    public void setImpot(int a) {
        impot = a;
    }

    public void payerImpot() {
        ville.addArgent(impot);
    }

    @Override
    public void destruction() {
        super.destruction();
        ville.removeBatimentImpot(this);
    }
}
